package org.dba.dbunit;

import java.io.InputStream;

public class wf_Db_Server {
	private static wf_Db_Server server;
	private wf_Db_Factory factory;

	public static synchronized wf_Db_Server getInstance() {
		if (server == null) {
			server = new wf_Db_Server();
		}
		return server;
	}


	public wf_Db_Factory getFactory(String database) throws wf_Db_Exception{
		InputStream stream = wf_Db_Server.class.getResourceAsStream(database+".property");
		this.factory = new wf_Db_Factory();
		this.factory.load(stream);
		return this.factory;
	}
}